import http from "@/utils/http";
import { AxiosRequestConfig } from "axios";

export interface GetDetail_ {
  /**
   * @description metricsId
   * @format int32
   */
  metricsId: number;
}

export class AtomicMetricsLibrary {
  /**
   * 指标列表展
   *
   * @tags 原子指标库controller
   * @request GET: /atomic-metrics-library/detail
   * @secure
   */
  getDetail = (query: { metricsId: number } | GetDetail_, params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityAtomicMetricsLibraryDetailVO>({
      url: `/atomic-metrics-library/detail`,
      method: "GET",
      params: query,
      ...params,
    });

  /**
   * 指标列表展示/指标id名称查询/根据主题查询/可选排序
   *
   * @tags 原子指标库controller
   * @request POST: /atomic-metrics-library/list
   * @deprecated
   * @secure
   */
  postList = (atomicMetricsLibDTO: defs.AtomicMetricsLibDTO, params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityPageInfoAtomicMetricsLibraryVO>({
      url: `/atomic-metrics-library/list`,
      method: "POST",
      data: atomicMetricsLibDTO,
      ...params,
    });
}

export default new AtomicMetricsLibrary();
